package com.chinaunicom.club.model;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;



public class Activity {
    private Integer id;

    private String organizers;

    @DateTimeFormat(pattern="MM/dd/YYYY HH:mm:ss")
    private Date activityDate;

    private String location;

    private String content;

    private Integer estimatedNumber;

    private BigDecimal estimatedAdvertisingFee;

    private BigDecimal estimatedMaterialFee;

    private BigDecimal estimatedWorkplaceFee;

    private BigDecimal estimatedOthersFee;

    private Integer actualNumber;

    private BigDecimal actualAdvertisingFee;

    private BigDecimal actualMaterialFee;

    private BigDecimal actualWorkplaceFee;

    private BigDecimal actualOthersFee;

    private String checkStatus;

    private Integer isCheck;

    private Integer isDel;
    
    private Double estimatedTotalFees;
    
    private Double actualTotalFees;
    
    public Double getEstimatedTotalFees(){
    	this.estimatedTotalFees = this.estimatedAdvertisingFee.doubleValue() + this.estimatedMaterialFee.doubleValue() 
    	+ this.estimatedOthersFee.doubleValue() + this.estimatedWorkplaceFee.doubleValue();
    	
    	return this.estimatedTotalFees;
    }

    public Double getActualTotalFees(){
    	this.actualTotalFees = this.actualAdvertisingFee.doubleValue() + this.actualMaterialFee.doubleValue()
    	+ this.actualOthersFee.doubleValue() + this.actualWorkplaceFee.doubleValue();
    	
    	return this.actualTotalFees;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	public Date getActivityDate() {
		return activityDate;
	}

	public void setActivityDate(Date activityDate) {
		this.activityDate = activityDate;
	}

	public void setEstimatedTotalFees(Double estimatedTotalFees) {
		this.estimatedTotalFees = estimatedTotalFees;
	}

	public void setActualTotalFees(Double actualTotalFees) {
		this.actualTotalFees = actualTotalFees;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOrganizers() {
        return organizers;
    }

    public void setOrganizers(String organizers) {
        this.organizers = organizers == null ? null : organizers.trim();
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location == null ? null : location.trim();
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content == null ? null : content.trim();
    }

    public Integer getEstimatedNumber() {
        return estimatedNumber;
    }

    public void setEstimatedNumber(Integer estimatedNumber) {
        this.estimatedNumber = estimatedNumber;
    }

    public BigDecimal getEstimatedAdvertisingFee() {
        return estimatedAdvertisingFee;
    }

    public void setEstimatedAdvertisingFee(BigDecimal estimatedAdvertisingFee) {
        this.estimatedAdvertisingFee = estimatedAdvertisingFee;
    }

    public BigDecimal getEstimatedMaterialFee() {
        return estimatedMaterialFee;
    }

    public void setEstimatedMaterialFee(BigDecimal estimatedMaterialFee) {
        this.estimatedMaterialFee = estimatedMaterialFee;
    }

    public BigDecimal getEstimatedWorkplaceFee() {
        return estimatedWorkplaceFee;
    }

    public void setEstimatedWorkplaceFee(BigDecimal estimatedWorkplaceFee) {
        this.estimatedWorkplaceFee = estimatedWorkplaceFee;
    }

    public BigDecimal getEstimatedOthersFee() {
        return estimatedOthersFee;
    }

    public void setEstimatedOthersFee(BigDecimal estimatedOthersFee) {
        this.estimatedOthersFee = estimatedOthersFee;
    }

    public Integer getActualNumber() {
        return actualNumber;
    }

    public void setActualNumber(Integer actualNumber) {
        this.actualNumber = actualNumber;
    }

    public BigDecimal getActualAdvertisingFee() {
        return actualAdvertisingFee;
    }

    public void setActualAdvertisingFee(BigDecimal actualAdvertisingFee) {
        this.actualAdvertisingFee = actualAdvertisingFee;
    }

    public BigDecimal getActualMaterialFee() {
        return actualMaterialFee;
    }

    public void setActualMaterialFee(BigDecimal actualMaterialFee) {
        this.actualMaterialFee = actualMaterialFee;
    }

    public BigDecimal getActualWorkplaceFee() {
        return actualWorkplaceFee;
    }

    public void setActualWorkplaceFee(BigDecimal actualWorkplaceFee) {
        this.actualWorkplaceFee = actualWorkplaceFee;
    }

    public BigDecimal getActualOthersFee() {
        return actualOthersFee;
    }

    public void setActualOthersFee(BigDecimal actualOthersFee) {
        this.actualOthersFee = actualOthersFee;
    }

    public String getCheckStatus() {
        return checkStatus;
    }

    public void setCheckStatus(String checkStatus) {
        this.checkStatus = checkStatus == null ? null : checkStatus.trim();
    }

    public Integer getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(Integer isCheck) {
        this.isCheck = isCheck;
    }

    public Integer getIsDel() {
        return isDel;
    }

    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

	@Override
	public String toString() {
		return "Activity [id=" + id + ", organizers=" + organizers + ", activityDate=" + activityDate + ", location="
				+ location + ", content=" + content + ", estimatedNumber=" + estimatedNumber
				+ ", estimatedAdvertisingFee=" + estimatedAdvertisingFee + ", estimatedMaterialFee="
				+ estimatedMaterialFee + ", estimatedWorkplaceFee=" + estimatedWorkplaceFee + ", estimatedOthersFee="
				+ estimatedOthersFee + ", actualNumber=" + actualNumber + ", actualAdvertisingFee="
				+ actualAdvertisingFee + ", actualMaterialFee=" + actualMaterialFee + ", actualWorkplaceFee="
				+ actualWorkplaceFee + ", actualOthersFee=" + actualOthersFee + ", checkStatus=" + checkStatus
				+ ", isCheck=" + isCheck + ", isDel=" + isDel + "]";
	}
}